package edu.nf.redismqes.common.VO;

/**
 * @ Author bin
 * @ Create  2025/10/21 上午11:10
 **/
public class ResultVO<T> {
    /**
     * 响应的消息
     */
    private Integer code;

    /**
     * 响应的消息
     */
    private String message;

    /**
     * 响应的数据
     */
    private T data;

    /**
     * Default constructor
     */
    public ResultVO() {
    }

    /**
     * Constructor with data only (success response)
     */
    public ResultVO(T data) {
        this.code = 200;
        this.message = "Success";
        this.data = data;
    }

    /**
     * Constructor with code, message, and data
     */
    public ResultVO(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String setMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}